package demo12_binarysorttree;

public class TestBinarySortTree {
    public static void main(String[] args) {
//        int[] arr = new int[]{1,2,3,4,5,6,7,8,9};
        int[] arr = {8,9,5,4,6,7};
        //创建一颗二叉排序树
        BinarySortTree bst = new BinarySortTree();
        //循环添加
        for (int i : arr){
            bst.add(new Node(i));
        }
//        System.out.println(bst.height(bst.root.right));

        System.out.println(bst.height(bst.root));
        System.out.println(bst.root.value);
    }
}
